<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}

    <style>
        .nav-tabs > li > a {
            font-size: 14px;
        }

        .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
            color: #555;
            background-color: #f3f3f3;
            border: 1px solid #ddd;
            border-bottom-color: transparent;
            cursor: default;
        }

        .tab-content .row {
            margin-left: 0;
            margin-right: 0;
        }

        .mini-box {
            min-height: 105px;
            padding: 20px;
        }

        .bg-success {
            background-color: #23AE89;
            color: #fff;
        }

        .mini-box .box-info p {
            margin: 0;
        }

        .size-h2 {
            font-size: 30px;
        }

        #summary_1 p.text-muted {
            color: #FFF;
            text-align: right;
        }

        #summary_1 p.text-muted {
            color: #FFF;
            text-align: right;
        }

        .size-h4 {
            font-size: 18px;
        }

        .panel:last-child {
            margin-bottom: 0;
        }

        .box-info {
            padding-top: 10px;
        }

        .bg-info {
            color: #fff;
            background: #2EC1CC;
        }

    </style>
</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>当前位置是:</li>
                <li>
                    <a href="{:url('cardus/cardinfo',['card_id'=>$card['card_id']])}">会员卡管理</a>
                </li>
                <li class="active" style="color: #02b87f;">储值管理</li>
            </ul>
        </div>
        <div class=" mgl15 mgr15">
            <div>
                <ul class="nav nav-tabs" role="tablist" id="myTabs">
                    <li role="presentation" >
                        <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">充值面额列表</a>
                    </li>
             
                    <li role="presentation">
                        <a href="#other" aria-controls="other" role="tab" data-toggle="tab">其他设置</a>
                    </li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content" style="padding-top: 15px;">
                    <div role="tabpanel" class="tab-pane" id="profile">
                        <form action="" id="tabform-2" method="get">
                            <input type="hidden" name="type" value="2">
                        </form>

                        <div class="panel panel-default">

                            <div class="panel-heading">
                                <h5 class="panel-title">
                                    {if condition="checkPath('marke/czgiveadd')"}
                                    <a class="btn btn-success" style="color: #fff;" href="{:url('marke/czgiveadds',['card_id'=>$card['card_id']])}">添加面额</a>
                                    {/if}
                                </h5>
                            </div>
                            <div class="panel-body">
                                <div class="alert alert-danger" role="alert"><p>会员须关注公众号,才能领取卡券。</p><p>系统会自动过滤规则中的过期卡券,已过期卡券将不会再向用户发放。</p></div>
                                <ul class="nav nav-tabs"  id="mycards">
                                    <li  class="active">
                                        <a href="#kai" aria-controls="kai"  data-toggle="tab">开启</a>
                                    </li>
                                    <li role="presentation">
                                        <a href="#quan" aria-controls="quan" data-toggle="tab">关闭</a>
                                    </li>


                                </ul>
                                <div id="mytab" class="tab-content">
                                    <div class="tab-pane fade in active"  id="kai"  role="tabpanel" style="padding-top: 15px;">


                                <table class="table table-bordered ">
                                    <thead>
                                    <tr>
                                        <th>充值(元)</th>
                                        <th>赠送金额(元)</th>
                                        <th>赠送积分</th>
                                        <th>赠送卡券</th>
                                        <th>状态</th>
                                        <th width="210px">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="givelist" id="givevo"}
                                    <tr>
                                        <td>{$givevo['cz_money']}</td>
                                        <td>{$givevo['zs_money']}</td>
                                        <td>{$givevo['bonus']}</td>
                                        <td>{:getgivecardnew($givevo['zs_card_id_all'],0)}{:getgivecard($givevo['zs_card_id'],0)}</td>
                                        <td>
                                            <a href="{:url('marke/czgivestatu',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}"
                                               class="gray-b">
                                                {eq name="givevo.statu" value="1"}
                                                开启
                                                {else/}
                                                关闭
                                                {/eq}
                                            </a>
                                        </td>
                                        <td>
                                            {if condition="checkPath('marke/czgiveedit')"}
                                            <a class="btn-link" href="{:url('marke/czgiveedits',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}" target="_parent">修改</a>
                                            {/if}
                                            {if condition="checkPath('marke/czgivehigh')"}
                                            <a class="btn-link" href="{:url('marke/czgivehigh',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}">高级配置</a>
                                            {/if}
                                        </td>
                                    </tr>
                                    {/volist}

                                    </tbody>
                                </table>
                              </div>
                              <div class="tab-pane fade " id="quan" role="tabpanel" style="padding-top: 15px;">

                                <table class="table table-bordered" >
                                    <thead>
                                    <tr>
                                        <th>充值(元)</th>
                                        <th>赠送金额(元)</th>
                                        <th>赠送积分</th>
                                        <th>赠送卡券</th>
                                        <th>状态</th>
                                        <th width="210px">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="givelistoff" id="givevo"}
                                    <tr>
                                        <td>{$givevo['cz_money']}</td>
                                        <td>{$givevo['zs_money']}</td>
                                        <td>{$givevo['bonus']}</td>
                                        <td>{:getgivecardnew($givevo['zs_card_id_all'],0)}{:getgivecard($givevo['zs_card_id'],0)}</td>
                                        <td>
                                            <a href="{:url('marke/czgivestatu',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}"
                                               class="gray-b">
                                                {eq name="givevo.statu" value="1"}
                                                开启
                                                {else/}
                                                关闭
                                                {/eq}
                                            </a>
                                        </td>
                                        <td>
                                            {if condition="checkPath('marke/czgiveedit')"}
                                            <a class="btn-link" href="{:url('marke/czgiveedits',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}" target="_parent">修改</a>
                                            {/if}
                                            {if condition="checkPath('marke/czgivehigh')"}
                                            <a class="btn-link" href="{:url('marke/czgivehigh',['id'=>$givevo['id'],'card_id'=>$givevo['card_id']])}">高级配置</a>
                                            {/if}
                                        </td>
                                    </tr>
                                    {/volist}

                                    </tbody>
                                </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


                    <div role="tabpanel" class="tab-pane" id="other">

                            <div class="panel panel-default mgl15 mgr15">
                                <form class="form-horizontal" action="{:url('cardus/is_qtprice')}" method="post">
                                    <input type="hidden" name="card_id" value="{$card['card_id']}">
                                    <div class="panel-body">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">其他金额：</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="is_cz_qtprice" id="qtprice1" {eq name="$cardus['is_cz_qtprice']" value="0"}checked="checked"{/eq} value="0" type="radio"
                                                               style="margin-left: 0;">
														<label class="is_cz_qtprice" for="qtprice1">显示</label>
													</span>
                                                <span class="radio pull-left">
														<input name="is_cz_qtprice" id="is_cz_qtprice" {eq name="$cardus['is_cz_qtprice']" value="1"}checked="checked"{/eq} type="radio" value="1"
                                                               style="margin-left: 0;">
														<label class="is_cz_qtprice" for="is_cz_qtprice">隐藏</label>
													</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ng-binding">在线充值备注推荐人：</label>
                                            <div class="col-sm-10">
													<span class="radio pull-left" style="margin-right: 15px;">
														<input name="is_rec_remark" id="qtprice3" {eq name="$cardus['is_rec_remark']" value="1"}checked="checked"{/eq} value="1" type="radio"
                                                               style="margin-left: 0;">
														<label class="ng-binding" for="qtprice3">显示</label>
													</span>
                                                <span class="radio pull-left">
														<input name="is_rec_remark"id="qtprice4" {eq name="$cardus['is_rec_remark']" value="2"}checked="checked"{/eq} type="radio" value="2"
                                                               style="margin-left: 0;">
														<label class="ng-binding" for="qtprice4">隐藏</label>
													</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="panel-footer">
                                        <button class="btn btn-success" type="submit">保存</button>
                                    </div>
                                </form>
                            </div>

                    </div>
                </div>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<script>
    function clearform1(){
        $("select").val("");
    }
    $(function(){
        var currentTab = "{:request()->get('type')}";
        if(!currentTab){
            $('#myTabs a[href="#profile"]').tab('show')
        }else{
            if(currentTab=='1'){
                $('#myTabs a[href="#home"]').tab('show')
            }else if(currentTab=='2'){
                $('#myTabs a[href="#profile"]').tab('show')
            }else if(currentTab=='3'){
                $('#myTabs a[href="#messages"]').tab('show')
            }else if(currentTab=='4'){
                $('#myTabs a[href="#settings"]').tab('show')
            }
        }
        $('#myTabs  a[href="#home"]').click(function (e) {
            e.preventDefault()
            $("#tabform-1").submit()
        });
        $('#myTabs  a[href="#profile"]').click(function (e) {
            e.preventDefault()
            $("#tabform-2").submit()
        });
        $('#myTabs  a[href="#messages"]').click(function (e) {
            e.preventDefault()
            $("#tabform-3").submit()
        });
        $('#myTabs  a[href="#settings"]').click(function (e) {
            e.preventDefault()
            $("#tabform-4").submit()
        })
    })
</script>
<script>

</script>
</body>

</html>
